<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 1.媒体查询一般按照从大到小或者从小到大的顺序来
        2. 小于540px  页面的背景颜色变成蓝色 */
        
        @media screen and (max-width: 539px) {
            body {
                background-color: blue;
            }
        }
        /* 3.540~970 我们的页面颜色变成绿色 */
        
        @media screen and (min-width: 540px) and (max-width: 969px) {
            body {
                background-color: aquamarine;
            }
        }
        
        @media screen and (min-width: 970px) {
            body {
                background-color: red;
            }
        }
    </style>
</head>

<body>
    <div>
        <p></p>
    </div>
</body>

</html>